-
Notifications
You must be signed in to change notification settings - Fork 195
Feature: add support for 3d secure to PayPal Commerce Gateway #7858
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: add support for 3d secure to PayPal Commerce Gateway #7858
Conversation
const {orderID, liabilityShift} = data; | ||
payPalOrderId = orderID | ||
|
||
if (liabilityShift && !['POSSIBLE', 'YES'].includes(liabilityShift)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jonwaldstein I was checking the link you shared in the PR description and couldn't see any response with "YES". Usually, they only return "Y" instead - check the attached screenshot.
Also, I can see in this other link that they said that "YES" is used for the liability_shift
property, but as you can see in the screenshot, they API responses are using the "Y" instead.
So, I'm a bit confused about the allowed values here and wondering if we should include the "Y" on this array as well.
Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@glaubersilva good question! I chatted with our PayPal rep about this and they said we can simply use the liability_shift
property to check for YES or POSSIBLE. However, as you pointed out there are a lot more responses we could check but that is completely up to what we want to support. To start, i'm happy to accept those simple values and reject the rest 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jonwaldstein Nice work! I just left a couple of comments related to minor changes.
In general, the code looks good to me, and it also seems to be working most of the time. I tested it with these testing credit cards:
The Visa worked well the three times I tested it, while Discover threw the INELIGIBLE_CARD_VENDOR
error all three times I tried to use it. The Mastercard threw the Error with obtaining 3DS contingency
error in one of the three times I tested it.
So, I think the error in the Mastercard was some random error from the PayPal API, but the Discover error is something persistent, and it makes me think that the PayPal docs is wrong, which does not surprise me. 😅
@glaubersilva thanks for the thorough testing! just resolved your comments 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jonwaldstein Great work man! Ready to go. 🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Passed QA tests
Resolves GIVE-2397
Description
This adds minimal support for 3d secure to the PayPal commerce gateway card fields api.
Affects
Visuals
N/A
Testing Instructions
SCA_ALWAYS
Pre-review Checklist
@unreleased
tags included in DocBlocks